package arpui.bean;

import jpcap.JpcapCaptor;

public class Device {
	private String no;
	private String ipAddress;
	private String netMask;
	private String gateWay;
	private String macAddress;
	private String deviceName;
	private String retStr = null;

	public Device() {}

	public Device(String no, String ipAddress, String netMask, String gateWay,
			String macAddress, String deviceName) {
		super();
		this.no = no;
		this.ipAddress = ipAddress;
		this.netMask = netMask;
		this.gateWay = gateWay;
		this.macAddress = macAddress;
		this.deviceName = deviceName;
	}

	public String getNo() {
		return no;
	}

	public void setNo(String no) {
		this.no = no;
	}

	public String getIpAddress() {
		return ipAddress;
	}

	public void setIpAddress(String ipAddress) {
		this.ipAddress = ipAddress;
	}

	public String getNetMask() {
		return netMask;
	}

	public void setNetMask(String netMask) {
		this.netMask = netMask;
	}

	public String getGateWay() {
		return gateWay;
	}

	public void setGateWay(String gateWay) {
		this.gateWay = gateWay;
	}

	public String getMacAddress() {
		return macAddress;
	}

	public void setMacAddress(String macAddress) {
		this.macAddress = macAddress;
	}

	public String getDeviceName() {
		return deviceName;
	}

	public void setDeviceName(String deviceName) {
		this.deviceName = deviceName;
	}
	
	private long mac;
	private int ip;
	private int mask;
	private int gw;
	private int connID;
	private String username;
	private String password;
	// 时间戳
	private long timeStamp = 0;
	
	public Device(long mac, int ip, int mask, int gw) {
		this.mac = mac;
		this.ip = ip;
		this.mask = mask;
		this.gw = gw;
	}
	
	public void setMac(long mac){
		this.mac = mac;
	}

	public void setIPInfo(int ip,int mask,int gw){
		this.ip = ip;
		this.mask = mask;
		this.gw = gw;
	}
	
	public void setConnID(int connID){
		this.connID = connID;
	}
	
	public void setUsrAndPass(String usr,String pass){
		this.password = pass;
		this.username = usr;
	}
	
	public long getTimeStamp() {
		return timeStamp;
	}

	public void setTimeStamp(long timeStamp) {
		this.timeStamp = timeStamp;
	}

	public void setRetStr(String str){
		this.retStr = str;
	}
	
	public String getRetStr(){
		return retStr;
	}
	
	/**
	 * 发送登录报文
	 * @param captor
	 */
	public void sendLongArp(JpcapCaptor captor){
	 	
	}
	
	/**
	 * 发送配置报文
	 * @param captor
	 */
	public void sendConfigArp(JpcapCaptor captor){
		
	}
	
	@Override
	public String toString() {
		return "Device [no=" + no + ", ipAddress=" + ipAddress + ", netMask="
				+ netMask + ", gateWay=" + gateWay + ", macAddress="
				+ macAddress + ", deviceName=" + deviceName + ", mac=" + mac
				+ ", ip=" + ip + ", mask=" + mask + ", gw=" + gw + "]";
	}
}
